import type { getHistoryType, SearchApiResponse } from '@/types/search'
import { http } from '@/utils/http'
/*获取用户关键词，进行搜索 */
export const serach = (data = {}) => {
  return http<SearchApiResponse>({
    method: 'GET',
    url: '/shop/mealsearch',
    data,
  })
}
/* 获取搜索历史记录接口 */
export const searchHistory = () => {
  return http<getHistoryType>({
    method: 'GET',
    url: '/shop/search',
  })
}
/* 新增搜索历史记录 */
export const addSearchHistory = (data = {}) => {
  return http({
    method: 'POST',
    url: '/shop/search',
    data,
  })
}
